<form id="typeform" style="padding-top:10px; ">
<#if currentObject??>
	<input name="form.id" value="${currentObject.id}" style="display: none"/>
	<input class="easyui-textbox" id="form.label" name="form.label" value="${currentObject.label}" data-options="label:'对象标签：',labelAlign:'right'" style="width: 250px;"/>
	<input class="easyui-textbox" id="form.name" name="form.name" value="${currentObject.name}" data-options="label:'对象名称：',labelAlign:'right'" style="width: 250px;"/>
	
	<a id="btn" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-save'"></a>
	
</#if>
<br/><br/>
	<table id="attributes"></table>  
	<br/>
	<table id="queryattribute"></table>  
</form>


<script type="text/javascript">
$(function(){
	$('#attributes').datagrid({
		url:"${currentPath}/getAttributeList?id=${currentObject.id}&scope=system",
		fitColumns:true,singleSelect:true,title:"默认属性",
		width:'100%',
	    columns:[[    
	        {field:'label',title:'属性标签',width:20},    
	        {field:'name',title:'属性名称',width:20},    
	        {field:'type',title:'属性类型',width:20},
	        {field:'id',title:'操作',width:20,formatter:function(value,row,index){
	        	var btn="<button type='button' class='btn btn-primary btn-xs'>编辑</button>";
	        	return btn;
	        }} 
	    ]]    
	});  
	
	$('#queryattribute').datagrid({
		url:"${currentPath}/getAttributeList?id=${currentObject.id}&scope=custom",
		fitColumns:true,singleSelect:true,title:"自定义属性",
		width:'100%',
	    columns:[[    
	    	{field:'label',title:'属性标签',width:20},    
	        {field:'name',title:'属性名称',width:20},    
	        {field:'type',title:'属性类型',width:20},
	        {field:'id',title:'操作',width:20,formatter:function(value,row,index){
	        	var btn1="<button type='button' class='btn btn-primary btn-xs'>编辑</button>";
	        	var btn2="<button type='button' class='btn btn-danger btn-xs'>删除</button>";
	        	return btn1+btn2;
	        }}     
	    ]]    
	});  
});
</script>